// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
import MapRoadUtils from "../map/road/MapRoadUtils";
import Point from "../map/road/Point";
const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {
    @property(cc.Label)
    pPosLabel:cc.Label = null;

    // LIFE-CYCLE CALLBACKS:

    start () {

    }

    //根据当前位置刷新坐标显示
    updatePosInfo(pos:cc.Vec2){
        var roadNode = MapRoadUtils.instance.getNodeByPixel(pos.x,pos.y);
        this.pPosLabel.string = roadNode.toString();
    }


    onFileOpenClick(){
        document.getElementById("file").click();
    }
    // update (dt) {}
}
